<style>
#repwdtr,#pwdtr{display:none}
</style>
<div class="easyui-panel" style="border-style:none;" >
	<div style="padding: 10px 0 10px 60px">
		<form id="editAdminForm" method="post" class="validate" >
		<input type="hidden" name="userid" value="${adminUser.userid }" />
			<table>
				<tr>
					<th><label class="text">用户名：</label></th>
					<td><input class="easyui-validatebox input_text" type="text" name="username" value="${adminUser.username!'' }" data-options="required:true"  dataType="string" isrequired="true" /></td>
				</tr>
				<tr>
					<th> </th>
					<td> <input type="checkbox" name="updatePwd" id="updatePwd" value="yes"  />同时修改密码 </td>
				</tr>
				<tr id="pwdtr">
					<th><label class="text">密码：</label></th>
					<td><input class="easyui-validatebox input_text" type="password" name="newPassword" id="pwd"  data-options="validType:['string','length[5,20]']" /></td>
				</tr>
				<tr id="repwdtr">
					<th><label class="text">确认密码：</label></th>
					<td><input class="easyui-validatebox input_text" type="password" id="repwd" dataType="string" data-options="validType:['string','length[5,20]']"  /></td>
				</tr>
				<tr>
					<th><label class="text">类型：</label></th>
					<td>
						<input type="radio"  name="founder" value="0" id="notSuperChk"  <#if adminUser.founder==0> checked="checked"</#if> >普通管理员&nbsp;&nbsp;
						<input type="radio"  name="founder" value="1" id="superChk" <#if adminUser.founder==1> checked="checked"</#if>>超级管理员
					</td>
				</tr>
				<tr id="roletr">
					<th><label class="text">角色：</label></th>
					<td>
						<ul style="width:100%" id="rolesbox">
							<#list roleList as role>
							<li style="width:33%;display:block">
								<input type="checkbox" name="roleids" value="${role.roleid }"  
									<#list userRoles as userrele>
										<#if userrele.roleid ==role.roleid>
										checked="checked"
										</#if> 
									</#list>>
								${role.rolename }&nbsp;</li>
							</#list>
							
						</ul> 
					</td>		
				</tr>
					<#list htmlList as html>
						${html }
					</#list>
				
				<tr>
					<th><label class="text">状态：</label></th>
					<td>
						<input type="radio"  name="state" value="1" <#if adminUser.state==1> checked=true </#if> >启用&nbsp;&nbsp;
						<input type="radio"  name="state" value="0" <#if adminUser.state==0> checked=true </#if> >禁用 
					</td>
				</tr>
				<tr>
					<th><label class="text">姓名：</label></th>
					<td><input type="text" class="input_text easyui-validatebox" name="realname" value="${adminUser.realname!'' }"   data-options="required:true"/></td>
				</tr>
				<tr>
					<th><label class="text">编号：</label></th>
					<td><input type="text" class="input_text" name="userno"  value="${adminUser.userno!''}" /></td>
				</tr>
				<tr>
					<th><label class="text">部门：</label></th>
					<td><input type="text" class="input_text" name="userdept" value="${adminUser.userdept!'' }"  /></td>
				</tr>
				<tr>
					<th><label class="text">备注：</label></th>
					<td><input type="text" class="input_text" name="remark"  value="${adminUser.remark!'' }" /></td>
				</tr>
			</table>
		</form>
	</div>
</div>
<script type="text/javascript">
$(function(){
	$("#notSuperChk").click(function(){
		if(this.checked)
		$("#roletr").show();
	});
	$("#superChk").click(function(){
		if(this.checked)
		$("#roletr").hide();
	});	
	$("#updatePwd").click(function(){
		if(this.checked){
			$("#pwdtr").show();
			$("#repwdtr").show();			
		}else{
			$("#pwdtr").hide();
			$("#repwdtr").hide();
		}
	});
});
</script>